<template>
<div class="body">
  <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
    <el-tab-pane label="请假申请" name="first">
  <!-- 这里是请假申请 -->
  <el-form ref="form" :model="form" label-width="80px">
  <el-form-item label="学生姓名">
    <el-input v-model="form.name" style="width: 500px;"></el-input>
  </el-form-item>
      <el-form-item label="学生学号">
    <el-input v-model="form.id" style="width: 500px;"></el-input>
  </el-form-item>
    <el-form-item label="联系方式">
    <el-input v-model="form.phone" style="width: 500px;"></el-input>
  </el-form-item>
  <el-form-item label="校区">
    <el-select v-model="form.region" placeholder="请选择所在校区">
      <el-option label="将军路校区" value="shanghai"></el-option>
      <el-option label="明故宫校区" value="beijing"></el-option>
    </el-select>
  </el-form-item>
  <el-form-item label="请假类型">
    <el-select v-model="form.region" placeholder="请选择请假类型">
      <el-option label="事假" value="shanghai"></el-option>
      <el-option label="病假" value="beijing"></el-option>
      <el-option label="公假" value="beijing"></el-option>
    </el-select>
  </el-form-item>
  <el-form-item label="审核老师">
    <el-select v-model="form.region" placeholder="请选择审核老师">
      <el-option label="张老师" value="shanghai"></el-option>
      <el-option label="李老师" value="beijing"></el-option>
      <el-option label="王老师" value="beijing"></el-option>
      <el-option label="杨老师" value="beijing"></el-option>
    </el-select>
  </el-form-item>

  <el-form-item label="起始日期">
    <el-col :span="6">
      <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 500px;"></el-date-picker>
    </el-col>
    <el-form-item label="结束时间">
    <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 500px;"></el-date-picker>
  </el-form-item>
  </el-form-item>
  
  <el-form-item label="申请理由" >
    <el-input type="textarea" v-model="form.desc" class="dec-input" :rows="6"></el-input>
    
  </el-form-item>
  <el-form-item>
    <el-button type="primary" @click="onSubmit">申请请假</el-button>
    <el-button>取消</el-button>
  </el-form-item>
</el-form>
</el-tab-pane>
<!-- ------------------------ -->
<el-tab-pane label="我的申请" name="second">
      <!-- 这是是申请结果 -->
  <span class="title">申请结果</span>
      <el-divider></el-divider>
<div class="block">
  <el-timeline>
    <el-timeline-item
      v-for="(activity, index) in activities"
      :key="index"
      :icon="activity.icon"
      :type="activity.type"
      :color="activity.color"
      :size="activity.size"
      :timestamp="activity.timestamp">
      {{activity.content}}
    </el-timeline-item>
  </el-timeline>
</div>

</el-tab-pane>
<el-tab-pane label="留言板" name="third">
</el-tab-pane>
  </el-tabs>
  </div>
</template>

<script>
export default {
    data() {
      return {
        form: {
          name: '',
          id:'',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: '',
          phone:''
        },
        activities: [{
          content: '申请请假',
          timestamp: '2022-04-25 16:46',
          size: 'large',
          type: 'primary',
          icon: 'el-icon-more'
        }, {
          content: '等待审核',
          timestamp: '2022-04-25 17:02',
          
        }, {
          content: '审核通过',
          timestamp: '2022-04-26 13:21',
          size: 'large',
          color: '#0bbd87'
        }]
      };
      
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      }
    }
  };
</script>

<style lang='less' scoped>
.body{
  background: #fff;
}
.block{
  width: 150px;
  height: 300px;
  margin-top: 50px;
  margin-left: 100px;
  padding: 20px;
  background: rgb(248, 246, 246);
  box-shadow:0 0 5px   rgba(0, 0, 0, .3);
}
.title{
  font-size: 16px;
  padding-left: 100px;
  color: #333;
}
.dec-input{
  width: 1000px;
 
}
</style>